import java.util.Scanner;

public class Test29 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int T = in.nextInt();
        while(T-- !=0){
            int H=in.nextInt();
            H-=1;
            if(H%2 == 0) {
                int a=decrease(H,2);
            }else{
                H-=1;
                int b=decrease(H,2);
            }
        }
    }

    private static int decrease(int h, int i) {
        int count=0;
        while(h!=0){
            h/=i;
            count++;
        }

    }

}
